﻿using Max.PH5_2006.ShoppingSite.Domain.Shared;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Max.PH5_2006.ShoppingSite.Domain
{
    [Table("tb_order")]
    public class OrderEntity : AuditField<Guid>
    {
        public string? OrderNo { get; set; } //订单编号 
        public Guid? MemberId { get; set; } //会员ID
        public DateTime OrderTime { get; set; } = System.DateTime.Now; //下单时间
        public decimal? OrderTotal { get; set; } //订单总金额
        public decimal? Rate { get; set; } //满减金额
        public decimal? PayTotal { get; set; } //实际付款
        public decimal? Freight { get; set; }//运费 
        public PayStatusEnum PayStatue { get; set; } = PayStatusEnum.未付款; //付款状态
        public PayTypeEnum PayType { get; set; } = PayTypeEnum.支付宝; //支付方式：微信、支付宝、其它。。。


        //public Guid MemberAddressId { get; set; }

        //数据库数据冗余设计
        public string? RecivedName { get; set; }//收件人
        public string? RecivedPhone { get; set; } //收件人电话
        public string? RecivedAddress { get; set; } //收件人地址

        public OrderStatueEnum OrderStatue { get; set; } = OrderStatueEnum.待付款; //订单状态

    }
}
